"""
杨辉三角
"""


def resolution1():
    n = int(input())
    # 在Python中动态开辟二维数组
    matrix = [[1] * n for _ in range(n)]
    # print(matrix)
    # 构造杨辉三角
    for i in range(1, n):
        for j in range(1, i):
            matrix[i][j] = matrix[i-1][j-1] + matrix[i-1][j]
    # 输出
    for x in range(n):
        for y in range(x+1):
            print(f"   {matrix[x][y]}", end="")
        print()


if __name__ == '__main__':
    resolution1()